<template>
   <div class="block">
    <span class="demonstration"></span>
    <el-carousel trigger="click" height="600px">
      <el-carousel-item v-for="(img,index) in imgList" :key="index">
        <img class="img" :src="img.url">
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
    export default {
        name: "banner",
      data(){
        return{
          imgList: [
            {url: 'http://www.raynen.cn/upfile/banner/banner1.jpg'},
            {url: 'http://www.raynen.cn/upfile/banner/banner2.jpg'},
            {url: 'http://www.raynen.cn/upfile/banner/banner3.jpg'},
          ]
        }
      }
    }
</script>

<style scoped>
  .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #f8f8f8;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #f8f8f8;
  }
  .img{
    width: 100%; height: 574px; overflow: hidden; background-position: center top;
  }
  .block{
    height: 620px
  }
</style>
